import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;


public class UpdatePlayer extends Query {

	@Override
	public void sendData(Channel channel) {
	  	DataPlayerClient player = new DataPlayerClient();
	    player.name = Config.name;
	    player.profession = 2;
	    player.sex = 3;
	    player.level = 4;
	    player.hpMax = 5;
	    player.mpMax = 6;
	    player.attack = 7;
	    player.speed = 8;
	    player.defense = 9;
	    player.defenseBreak = 10;
	    player.dodge = 11;
	    player.hit = 12;
	    player.critical = 13;
	    player.criticalBreak = 14;
	    player.country = 15;
	    int count = 3;
	    player.skills = new int[count];
	    for (int i = 0; i < count; i++)
	    {
	        player.skills[i] = i;
	    }
	    player.equips = player.skills;
	    prepare("updatePlayer");
	    appendParamObject(player, "DataPlayer");
		send();
		System.out.println("update player send");
	}

	@Override
	public void receiveData(ChannelBuffer data) {
		// TODO Auto-generated method stub
		System.out.println("update player recv");
	}

}
